load("@rules_cc//cc:cc_library.bzl", "cc_library")

cc_library(
    name = "boost.winapi",
    hdrs = glob(
        [
            "include/**/*.hpp",
        ],
        exclude = glob([
            "include/boost/detail/**/*.hpp",
            "include/boost/winapi/*.hpp",
        ]),
    ),
    defines = select({
        "@platforms//os:windows": [
            "WIN32_LEAN_AND_MEAN",  # Prevent windows.h from including winsock.h
            "NOMINMAX",  # Prevent Windows min/max macros
            "BOOST_USE_WINAPI_VERSION=0x0A00",  # Windows 10+ (includes all Win8+ features)
            "_WIN32_WINNT=0x0A00",  # Windows 10+ for full feature support
        ],
        "//conditions:default": [],
    }),
    features = [
        "parse_headers",
    ],
    includes = ["include"],
    textual_hdrs = glob([
        "include/boost/detail/**/*.hpp",
        "include/boost/winapi/*.hpp",
    ]),
    visibility = ["//visibility:public"],
    deps = [
        "@boost.config",
        "@boost.predef",
    ],
)
